How to do imagemaps

Create the imagemap with your favorite graphics package, i.e. Freelance, Quattro Pro, Corel Draw, xpaint, etc. or use an existing image. There are also numerous shareware and public domain programs available for downloading. You should use the GIF (or X bitmap (xbm)) graphics file format for imagemaps.

You may wish to use mapedit, a WYSIWYG imagemap editor for X and Windows. There is also more information there about creating an imagemap. WebMap (alt) is available for Macs. Mapmaker will assist in creating the map file for you.

Your imagemap file (postharv.map) must be referenced in the imagemap.conf file in the httpd server directory. (The new imagemap program does not require the imagemap.conf file.) Ask your network administrator to make the entry for you. The entry would be of this form:

postharv : /afs/eos/service/bae/www/programs/extension/publicat/postharv/postharv.map
where postharv will be used in the HTML document link and postharv.map contains the following document links and the upper left hand and lower right hand corner coordinates, i.e.

default /eos/service/bae/www/programs/extension/publicat/postharv/no-image.html

rect /eos/service/bae/programs/extension/publicat/postharv/ag-413-1/index.html 0,0     155,80

rect /eos/service/bae/programs/extension/publicat/postharv/ag-413-2/index.html 0,81    155, 148

rect /eos/service/bae/programs/extension/publicat/postharv/ag-413-3/index.html 0, 149  155, 219

rect /eos/service/bae/programs/extension/publicat/postharv/ag-413-4/index.html 156,0   405, 80

rect /eos/service/bae/programs/extension/publicat/postharv/ag-413-5/index.html 156,81  405,148

rect /eos/service/bae/programs/extension/publicat/postharv/ag-413-6/index.html 156,149 405,219

rect /eos/service/bae/programs/extension/publicat/postharv/ag-413-7/index.html 406,0   571,80

rect /eos/service/bae/programs/extension/publicat/postharv/ag-413-8/index.html 406,81  571,148

The default document is returned when a portion of the image has not been mapped to any other document. Circles, polygons, and points are available in addition to rectangular areas. These areas may overlap. In the case of overlap, the first link listed in the map file that is mapped to the point selected will be used. See the official documentation for more details. I would generally recommend that the whole imagemap be linked to something so that the default is never used. You may want to use xv (xv-3.00a.tar.Z) for X or Paint Shop Pro (pspro200.zip) for Windows to obtain the pixel coordinates for the map file. Other useful graphics programs are also available.

Your HTML document reference in this example is:

<a href="http://www2.bae.ncsu.edu/cgi-bin/imagemap/postharv">
<img src="postharv.gif" alt="[ ImageMap, 6K ]" ismap> </a>

where postharv refers to the first word of the entry in the imagemap.conf file.

Here is the result.

Other references to imagemaps and examples.

Also see information on transparent images and other graphics programs.

jwalker@eos.ncsu.edu
http://www2.ncsu.edu/bae/people/faculty/walker/hotlist/imagemap.html